home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
CIncludes
/
GXMessages.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-01
|
6KB
|
226 lines
/*
File: GXMessages.h
Contains: This file contains all of the public data structures,
Version: Technology: Quickdraw GX 1.1
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __GXMESSAGES__
#define __GXMESSAGES__
#ifndef __CONDITIONALMACROS__
#include <ConditionalMacros.h>
#endif
#ifndef __MIXEDMODE__
#include <MixedMode.h>
#endif
#ifndef __TYPES__
#include <Types.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
#if defined(__MWERKS__) && GENERATING68K
#pragma push
#pragma pointers_in_D0
#endif
/*
>>>>>> CONSTANTS <<<<<<
*/
/* Message Manager Trap */
enum {
messageManagerTrap = 0xABFB
};
/* Message Manager Gestalt Selector */
enum {
gestaltMessageMgrVersion = 'mess'
};
/* Message Manager Error Result Codes */
enum {
messageStopLoopingErr = -5775,
cantDeleteRunningHandlerErr = -5776,
noMessageTableErr = -5777,
dupSignatureErr = -5778,
messageNotReceivedErr = -5799
};
/*
DATA TYPES
*/
typedef OSErr (*MessageHandlerOverrideProcPtr)(long arg1, long arg2, long arg3, long arg4, long arg5, long arg6);
#if GENERATINGCFM
typedef UniversalProcPtr MessageHandlerOverrideUPP;
#else
typedef MessageHandlerOverrideProcPtr MessageHandlerOverrideUPP;
#endif
enum {
uppMessageHandlerOverrideProcInfo = kCStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(long)))
};
#if GENERATINGCFM
#define NewMessageHandlerOverrideProc(userRoutine) \
(MessageHandlerOverrideUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppMessageHandlerOverrideProcInfo, GetCurrentArchitecture())
#else
#define NewMessageHandlerOverrideProc(userRoutine) \
((MessageHandlerOverrideUPP) (userRoutine))
#endif
#if GENERATINGCFM
#define CallMessageHandlerOverrideProc(userRoutine, arg1, arg2, arg3, arg4, arg5, arg6) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppMessageHandlerOverrideProcInfo, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
#else
#define CallMessageHandlerOverrideProc(userRoutine, arg1, arg2, arg3, arg4, arg5, arg6) \
(*(userRoutine))((arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
#endif
typedef void (*MessageGlobalsInitProcPtr)(void *messageGlobals);
#if GENERATINGCFM
typedef UniversalProcPtr MessageGlobalsInitUPP;
#else
typedef MessageGlobalsInitProcPtr MessageGlobalsInitUPP;
#endif
enum {
uppMessageGlobalsInitProcInfo = kCStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
};
#if GENERATINGCFM
#define NewMessageGlobalsInitProc(userRoutine) \
(MessageGlobalsInitUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppMessageGlobalsInitProcInfo, GetCurrentArchitecture())
#else
#define NewMessageGlobalsInitProc(userRoutine) \
((MessageGlobalsInitUPP) (userRoutine))
#endif
#if GENERATINGCFM
#define CallMessageGlobalsInitProc(userRoutine, messageGlobals) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppMessageGlobalsInitProcInfo, (messageGlobals))
#else
#define CallMessageGlobalsInitProc(userRoutine, messageGlobals) \
(*(userRoutine))((messageGlobals))
#endif
#if OLDROUTINENAMES
typedef MessageHandlerOverrideProcPtr MessageHandlerOverrideProc;
typedef MessageGlobalsInitProcPtr MessageGlobalsInitProc;
#endif
typedef struct OpaqueMessageHandler* MessageHandler;
typedef struct OpaqueMessageObject* MessageObject;
/*
PUBLIC INTERFACES
Message Handler API Routines
*/
extern long CountMessageHandlerInstances(void )
TWOWORDINLINE(0x7028, 0xABFB);
extern void *GetMessageHandlerClassContext(void )
TWOWORDINLINE(0x7029, 0xABFB);
extern void *SetMessageHandlerClassContext(void *anyValue)
TWOWORDINLINE(0x702A, 0xABFB);
extern void *GetMessageHandlerInstanceContext(void )
TWOWORDINLINE(0x702B, 0xABFB);
extern void *SetMessageHandlerInstanceContext(void *anyValue)
TWOWORDINLINE(0x702C, 0xABFB);
extern OSErr NewMessageGlobals(long messageGlobalsSize, MessageGlobalsInitUPP initProc)
TWOWORDINLINE(0x702D, 0xABFB);
extern void DisposeMessageGlobals(void )
TWOWORDINLINE(0x702E, 0xABFB);
/*
Message Sending API Routines
*/
#ifndef BUILDING_GXMESSAGES
extern OSErr SendObjectMessage(MessageObject msgObject, long messageSelector, ...)
FIVEWORDINLINE(0x205F, 0x221F, 0x702F, 0xABFB, 0x518F);
extern OSErr SendObjectMessageTo(MessageObject msgObject, long messageSelector, MessageHandler msgHandler, ...)
SEVENWORDINLINE(0x205F, 0x221F, 0x241F, 0x7030, 0xABFB, 0x9EFC, 0x000C);
extern OSErr SendObjectMessageFor(MessageObject msgObject, long messageSelector, MessageHandler msgHandler, ...)
SEVENWORDINLINE(0x205F, 0x221F, 0x241F, 0x7037, 0xABFB, 0x9EFC, 0x000C);
extern OSErr StartObjectMessageAt(MessageObject msgObject, long messageSelector, MessageHandler msgHandler, ...)
SEVENWORDINLINE(0x205F, 0x221F, 0x241F, 0x7031, 0xABFB, 0x9EFC, 0x000C);
extern OSErr SendMessage(long messageSelector, ...)
FOURWORDINLINE(0x221F, 0x7032, 0xABFB, 0x598F);
extern OSErr SendMessageTo(long messageSelector, MessageHandler msgHandler, ...)
FIVEWORDINLINE(0x221F, 0x241F, 0x7033, 0xABFB, 0x518F);
extern OSErr StartMessageAt(long messageSelector, MessageHandler msgHandler, ...)
FIVEWORDINLINE(0x221F, 0x241F, 0x7034, 0xABFB, 0x518F);
extern OSErr ForwardMessage(long messageSelector, ...)
FOURWORDINLINE(0x221F, 0x7035, 0xABFB, 0x598F);
extern OSErr ForwardThisMessage(void *parameter1, ...)
TWOWORDINLINE(0x7036, 0xABFB);
#endif /* BUILDING_GXMESSAGES */
#if defined(__MWERKS__) && GENERATING68K
#pragma pop
#endif
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#ifdef __cplusplus
}
#endif
#endif /* __GXMESSAGES__ */